home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9838 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  41 lines

  1. Path: bmtlh10.bnr.ca!news
  2. From: John Hickin <hickin@bnr.ca>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: is <string.h> standard in c++?
  5. Date: 4 Mar 1996 19:04:58 GMT
  6. Organization: Bell Northern Research
  7. Message-ID: <4hfesq$hsf@bmtlh10.bnr.ca>
  8. References: <313B0603.1CD@dal.ca>
  9. NNTP-Posting-Host: bmtlh520.bnr.ca
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715)
  14. X-URL: news:313B0603.1CD@dal.ca
  15.  
  16. #include <string.h>
  17.  
  18. I can't comment on the 2.7.2 implementation but I have experience with the
  19. 2.7.1 implementation:
  20.  
  21. 1. In my opinion it violates the standard.  First, reserve() is an empty
  22. function.  Second, I believe that the wording of the standard limits any
  23. reference counted approach to the cases of 0 or 1 references (carefully read
  24. the
  25. description of the copy constructor and assignment operator and see if you
  26. agree with me).  In contrast the gnu 2.7.1 implementation seems to allow up to
  27. 255 references.
  28.  
  29. 2. See an earlier post to comp.std.c++ by James Kanze on the difficulties of
  30. implementing copy-on-write semantics (also used in the gnu implementation) with
  31. respect to the reserve() function.
  32.  
  33.  
  34. This implementation may have incompatibilities with the standard but I feel
  35. that it is a good place to start getting practice.
  36.  
  37. -- 
  38. John Hickin      Nortel Technology, Montreal, Quebec
  39. (514) 765-7924   hickin@bnr.ca
  40.  
  41.